<template>
    <component :is="activeComponent" :home-id="homeId" :client-id="clientId" :faceAccess="faceAccess"></component>
</template>

<script>
    /**
        interface room {
            roomOpenType: roomOpenType
        }
     */
    import { noNamespaceTabsMap } from './type.d.js'
import accessError from './access-error'
import visitorRegister from './visitor-register'
import accessOpenHistory from './access-open-history'

export default {
      name: 'room-detail-wrap',
      props: {
        faceAccess: Array,
        type: String,
        homeId: Number,
        clientId: Number
      },
      components: {
        accessError,
        visitorRegister,
        accessOpenHistory
      },
      computed: {
        activeComponent () {
          return noNamespaceTabsMap[this.type].component
        }
      }
    }
</script>